1. Field of the Invention
The invention relates to coding a sequence of pictures. The invention may be applied, for example, in a video coder operating in accordance with a standard fixed by the Moving Pictures Experts Group (MPEG).
2. Description of the Related Art
Video coding in accordance with the MPEG-4 standard will comprise functions such as motion estimation, motion compensation, discrete-cosine transformation (DCT) and quantization. The motion estimation establishes a motion vector for a block of pixels in a current picture to be coded. The motion vector indicates a block of pixels in a previous picture which is similar to the block of pixels in the current picture to be coded. The motion compensation provides a prediction-error block which is the difference between the two aforementioned blocks of pixels. The prediction-error block undergoes a DCT. The result is a block of DCT coefficients. The quantization involves dividing each DCT coefficient by a quantization parameter and rounding off the result to the nearest integer.
In MPEG-4 information xe2x80x9cQ2 Core Experiment: macroblock rate controlxe2x80x9d, ISO/IEC JTC1/SC29/WG11 MPEG96/M2159, April 1997, Bristol (UK), a proposal has been made for controlling the quantization parameter block-by-block. For each block of pixels, a sum of squared values in the prediction-error block is calculated. This sum is referred to as the sum of absolute differences (SAD). The quantization parameter is controlled on the basis of the SAD.
It is an object of the invention to code of a sequence of pictures such that a relatively good picture quality can be obtained at a decoding end.
The invention takes the following aspects into consideration. The perceived picture quality at a decoding end is mainly determined by certain portions in a picture which a viewer regards as being xe2x80x9cinterestingxe2x80x9d. In many cases, a viewer will focus on moving objects rather than on stationary objects. Thus, the precision with which moving objects are coded will greatly influence the perceived picture quality.
The invention builds on the following features. A motion vector is established indicating a block of pixels in a previous picture which is similar to a block of pixels in a current picture to be coded. Data relating to the block of pixels in the current picture is compressed, the extent to which the data is compressed depending on a compression parameter. These features are comprised in, for example, MPEG video-coding in which blocks of DCT coefficients constitute the data to be compressed, and the quantization parameter constitutes the compression parameter.
In accordance with the invention, the compression parameter is controlled on the basis of the motion vector. Accordingly, data relating to a block of pixels representing a moving object can be compressed to a relatively small extent, whereas data relating to a block of pixels representing a stationary object can be compressed to a relatively large extent. Such a motion-vector based control of the quantization parameter makes that a moving object is coded with a relatively great precision. Thus, the invention allows a relatively good picture quality at a decoding end.
It should be noted that there are two basic methods of controlling the compression parameter on the basis of the motion vector. In one basic method, a stationary camera provides a sequence of pictures to be coded. Then, a block of pixels representing a moving object will have a relatively large motion vector, and a block of pixels representing a background will have a relatively small motion vector. Consequently, data should be compressed to a relatively small extent if the motion vector is large and, conversely, data should be compressed to a relatively great extent if the motion vector is relatively small. In the other method, a camera that is tracking a moving object provides a sequence of pictures to be coded. Then, a block of pixels representing a moving object will have a relatively small motion vector, and a block of pixels representing the background will have a relatively large motion vector. Consequently, data should be compressed to a relatively small extent if the motion vector is relatively small and, conversely, it should be compressed to a relatively great extent if the motion vector is relatively large.